﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace PaymentService
{
  
    [ServiceContract]
    public interface IPaymentService
    {

        [OperationContract]
        [FaultContract(typeof(PaymentIssue))]
        bool GetPaymentStatus(PaymentDetails payment);

    }

    [DataContract]
    public class PaymentDetails
    {
        private string payerName;

        [DataMember]
        public string PayerName
        {
            get { return payerName; }
            set { payerName = value; }
        }
        private string creditCardNo;

        [DataMember]
        public string CreditCardNo
        {
            get { return creditCardNo; }
            set { creditCardNo = value; }
        }
        private string expiryDate;

        [DataMember]
        public string ExpiryDate
        {
            get { return expiryDate; }
            set { expiryDate = value; }
        }

        private decimal paymentAmount;

        [DataMember]
        public decimal PaymentAmount
        {
            get { return paymentAmount; }
            set { paymentAmount = value; }
        }

    }

    [DataContract]
    public class PaymentIssue
    {
        private string creditCardNo;

        [DataMember]
        public string CreditCardNo
        {
            get { return creditCardNo; }
            set { creditCardNo = value; }
        }
        private string issue;

        [DataMember]
        public string Issue
        {
            get { return issue; }
            set { issue = value; }
        }

    }
}
